import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:xiandou/Common.dart';

class UserProfileScreen extends StatefulWidget {
  @override
  State<StatefulWidget> createState() =>  UserProfileScreenState();
}

class UserProfileScreenState extends State<UserProfileScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CupertinoNavigationBar(
        backgroundColor: Colors.white,
        middle: const Text('个人资料'),
      ),
      body: Container(
          margin: const EdgeInsets.only(left: 10,right: 10,top: 15),
          height: 120,
          decoration: new BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(Radius.circular(5.0)),
          ),
          child: Column(
            children: <Widget>[
              Container(
                height: 60,
                width: MediaQuery.of(context).size.width,
                child: Column(
                  children: <Widget>[
                    Expanded(
                      child: Row(
                        children: <Widget>[
                          SizedBox(width: 15,),
                          Expanded(
                            child: Text('头像',style: TextStyle(color: Common.blackColor,fontSize: 14,fontWeight: FontWeight.w500),),
                          ),
                          GestureDetector(
//                        onTap: _pushToUserProfileController,
                              child: Container(
                                width: 45,
                                height: 45,
                                margin: const EdgeInsets.only(right: 20),
                                decoration: new BoxDecoration(
                                    borderRadius: BorderRadius.all(Radius.circular(22.5)),
                                    border: Border.all(color: Common.xdOrangeColor, width: 1.5),
                                    image: DecorationImage(
                                      image:new NetworkImage('http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'),
                                    )
                                ),
                              )
                          )
                        ],
                      ),
                    ),
                    Container(
                        padding: const EdgeInsets.only(left: 25,right: 22,bottom: 0),
                        child: Divider(height: 1,color: Color(0xffEEEEEE),)
                    )
                  ],
                ),
              ),
              Container(
                height: 60,
                width: MediaQuery.of(context).size.width,
                child: Column(
                  children: <Widget>[
                    Expanded(
                      child: Row(
                        children: <Widget>[
                          SizedBox(width: 15,),
                          Expanded(
                            child: Text('昵称',style: TextStyle(color: Common.blackColor,fontSize: 14,fontWeight: FontWeight.w500),),
                          ),
                          GestureDetector(
//                        onTap: _pushToUserProfileController,
                              child: Padding(
                                padding: const EdgeInsets.only(right: 20),
                                child: Text('555555'),
                              )
                          )
                        ],
                      ),
                    ),
                    Container(
                        padding: const EdgeInsets.only(left: 25,right: 22,bottom: 0),
                        child: Divider(height: 1,color: Color(0xffEEEEEE),)
                    )
                  ],
                ),
              ),
//              Container(
//                height: 60,
//                width: MediaQuery.of(context).size.width,
//                child: Column(
//                  children: <Widget>[
//                    Expanded(
//                      child: Row(
//                        children: <Widget>[
//                          SizedBox(width: 15,),
//                          Expanded(
//                            child: Text('昵称',style: TextStyle(color: Common.blackColor,fontSize: 14,fontWeight: FontWeight.w500),),
//                          ),
//                          GestureDetector(
////                        onTap: _pushToUserProfileController,
//                              child: Container(
//                                width: 45,
//                                height: 45,
//                                margin: const EdgeInsets.only(right: 10),
//                                decoration: new BoxDecoration(
//                                    borderRadius: BorderRadius.all(Radius.circular(22.5)),
//                                    border: Border.all(color: Common.xdOrangeColor, width: 1.5),
//                                    image: DecorationImage(
//                                      image:new NetworkImage('http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=0d023672312ac65c67506e77cec29e27/9f2f070828381f30dea167bbad014c086e06f06c.jpg'),
//                                    )
//                                ),
//                              )
//                          )
//                        ],
//                      ),
//                    ),
//                    Container(
//                        padding: const EdgeInsets.only(left: 25,right: 22,bottom: 0),
//                        child: Divider(height: 1,color: Color(0xffEEEEEE),)
//                    )
//                  ],
//                ),
//              ),
            ],
          )
      ),
    );
    // TODO: implement build
    throw UnimplementedError();
  }
}